package org.ouwh.fw.threadpool;

public class CountUpLatch {
	private int count = 0;

	public synchronized void countUp() {
		count++;
		this.notifyAll();
	}

	public synchronized void await(int n) {
		while (count < n) {
			try {
				this.wait(100);
			} catch (Exception e) {
			}
		}
	}

}
